import service from '/@/utils/request';
import axios from 'axios';
export function get_goods_list(name: string, page_no: number, page_size: number) {
    return service.post<any>("/goods/list", {
            name: name,
            pageSize: page_size,
            pageNo: page_no,
    })
}

export function add(name: string,unit: string,price: string) {
    return service.post<any>("/goods/add", {
        name: name,
        price: price,
        unit: unit
 
    })
}

export function update(id: string, name: string,unit: string,price: string){
    return service.post<any>("/goods/update", {
        id: id,
        name: name,
        price: price,
        unit: unit

    })
}

export function del(id:string) {
    return service.post<any>("/goods/del", {
        id: id,

    })
}
export function goods_type_sel() {
    return service.post<any>("/goods/goods_type_sel", {
    })
}